﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Styles;
using Accounting.Library;

namespace csla4Skeleton.UI.SL.NghiepVu.BanSanPham.BSP_BanDichVu
{
    public class BSP_BanDichVuStatusStyle : GridViewRowStyleSelector
    {
        BackgroundStatusColorProvider colorProvider = new BackgroundStatusColorProvider();
        public override Style SelectStyle(object item, DependencyObject container)
        {
            Style style = null;
            if (item is BSP_BanDichVuInfo)
            {
                BSP_BanDichVuInfo BSP_BanDichVuInfo = item as BSP_BanDichVuInfo;
                if (!BSP_BanDichVuInfo.DaGhiSo)
                {
                    style = GetBackGroundStyle(colorProvider.BSP_BanDichVu_ChuaGhiSo);
                }
                else if (BSP_BanDichVuInfo.DaThanhToan)
                {
                    style = GetBackGroundStyle(colorProvider.BSP_BanDichVu_DaThanhToan);
                }
                else
                {
                    style = GetBackGroundStyle(colorProvider.BSP_BanDichVu_PhieuThuong);
                }
            }
            return style;
        }
    }
}
